﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace JWTWebApi.Models
{
    /// <summary>
    /// 订单类，用于表示订单信息
    /// </summary>
    [Description("订单类")]
    public class OrderData
    {
        /// <summary>
        /// 订单ID
        /// </summary>
        [Required]
        [Description("订单ID")]
        public int OrderId { get; set; }

        /// <summary>
        /// 客户ID
        /// </summary>
        [Required]
        [Description("客户ID")]
        public int CustomerId { get; set; }

        /// <summary>
        /// 客户姓名
        /// </summary>
        [Description("客户姓名")]
        public string? CustomerName { get; set; }

        /// <summary>
        /// 客户姓名
        /// </summary>
        [Description("客户姓名")]
        public string? TokenUserName { get; set; }

        /// <summary>
        /// 订单日期
        /// </summary>
        [Description("订单日期")]
        public DateTime OrderDate { get; set; }

        /// <summary>
        /// 订单总额
        /// </summary>
        [Required]
        [DefaultValue(100d)]
        [Description("订单总额")]
        public double TotalAmount { get; set; }

        /// <summary>
        /// 订单状态
        /// </summary>
        [Description("订单状态")]
        public string? Status { get; set; }
    }
}
